package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * Address entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "addresses")
@GeneratorKey(tableName = "addresses")
public class AddressVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 2178570655741781077L;

	@Column(name = "address")
	private String address;

	@Column(name = "box_number", length = 50)
	private String boxNumber;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", nullable = false)
	private CustomerVO customer;

	@Column(name = "district", length = 50)
	private String district;

	@Column(name = "location", nullable = false, length = 50)
	private String location;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_address_type_id", nullable = false)
	private NomAddressTypeVO nomAddressType;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_country_id", nullable = false)
	private NomCountryVO nomCountry;

	@Column(name = "post_code", length = 15)
	private String postCode;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "post_code_id")
	private PostCodeVO postCodeFK;

	/** default constructor */
	public AddressVO() {
		super();
	}

	/** @return the address */
	public String getAddress() {
		return this.address;
	}

	/** @return the boxNumber */
	public String getBoxNumber() {
		return this.boxNumber;
	}

	/** @return the customer */
	public CustomerVO getCustomer() {
		return this.customer;
	}

	/** @return the district */
	public String getDistrict() {
		return this.district;
	}

	/** @return the location */
	public String getLocation() {
		return this.location;
	}

	/** @return the nomAddressType */
	public NomAddressTypeVO getNomAddressType() {
		return this.nomAddressType;
	}

	/** @return the nomCountry */
	public NomCountryVO getNomCountry() {
		return this.nomCountry;
	}

	/** @return the postCode */
	public String getPostCode() {
		return this.postCode;
	}

	/** @return the postCodeFK */
	public PostCodeVO getPostCodeFK() {
		return this.postCodeFK;
	}

	/**
	 * @param address
	 *            the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @param boxNumber
	 *            the boxNumber to set
	 */
	public void setBoxNumber(String boxNumber) {
		this.boxNumber = boxNumber;
	}

	/**
	 * @param customer
	 *            the customer to set
	 */
	public void setCustomer(CustomerVO customer) {
		this.customer = customer;
	}

	/**
	 * @param district
	 *            the district to set
	 */
	public void setDistrict(String district) {
		this.district = district;
	}

	/**
	 * @param location
	 *            the location to set
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * @param nomAddressType
	 *            the nomAddressType to set
	 */
	public void setNomAddressType(NomAddressTypeVO nomAddressType) {
		this.nomAddressType = nomAddressType;
	}

	/**
	 * @param nomCountry
	 *            the nomCountry to set
	 */
	public void setNomCountry(NomCountryVO nomCountry) {
		this.nomCountry = nomCountry;
	}

	/**
	 * @param postCode
	 *            the postCode to set
	 */
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	/**
	 * @param postCodeFK
	 *            the postCodeFK to set
	 */
	public void setPostCodeFK(PostCodeVO postCodeFK) {
		this.postCodeFK = postCodeFK;
	}
}